package com.test;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.paas.base.modules.utils.net.http.HttpUtil;

public class RoleService {

	public static String getBaseURI() {
		return "http://127.0.0.1:8080/menurolepermission/1.0.0/role";
//		return "http://192.168.0.119:19687/menurolepermission/1.0.0/permission";
	} 
	
	public static void page() throws IOException{
		Map<String,Object> paramMap = new HashMap<String,Object>();
		paramMap.put("page", 1);
		paramMap.put("pageSize", 3);
		String vo = HttpUtil.postFormParams(getBaseURI(), "/query/page", paramMap);
		System.out.println(vo);
	}
	
	public static void find() throws IOException{
		String id = "gway00007jhn8d0come9jx5e2wijmxpxrgstga3q";
		
		String vo = HttpUtil.get(getBaseURI()+"/get/role/"+id,new HashMap<String,String>() );
		System.out.println(JSONObject.toJSONString(vo));
	}
	
	public static void main(String[] args) throws IOException {
		find();
	}
	
}
